import http from '@/utils/http.js'

export const apiGetGoodsInfo = (data) => {
    return http.post('/seven/secondHandWarehouse/selectByProductNo', data)
}

//获取首页配置
export const apiGetHomepageInfo = (data) => {
    return http.post('/seven/AppHomepage/select ', data)
}

//添加历史记录
export const apiAddHistoricalRecords = (data) => {
    return http.post('/seven/History/historicalRecords', data)
}

//查询历史记录
export const apiGetHistoricalRecords = (data) => {
    return http.post('/seven/History/select', data)
}

//查询全部品牌
export const apiGetAllBrand = (data) => {
    return http.post('/seven/brand/selectAll', data)
}

//微信登录
export const apiwxLogin = (data) => {
    return http.post('/wx/backstageLogin', data)
}

//修改用户信息
export const apiUpdateUserInfo = (data) => {
    return http.post('/wx/backstageUpdateById ', data)
}
// 商品编号查询
export const apiGetGoodsByCode = (data) => http.post('/seven/secondHandWarehouse/selectByProductNo', data)
//扫码添加
export const apiAddGoodsByBarCode = (data) => http.post('/seven/secondHandWarehouse/scanToGenerate', data)
//根据品牌id查询系列
export const apiGetSeriesByBrandId = (data) => http.post('/seven/brandSeries/selectByHeadId', data)
// 上传文件
export const apiUploadFile = (formData) => http.post('/seven/secondHandWarehouse/photoUpload', formData)
//修改商品
export const apiUpdateGoods = (data) => http.post(`/seven/secondHandWarehouse/updateById`, data)
// 查询商品列表
export const apiGetGoodsList = (data) => http.post(`/seven/secondHandWarehouse/select`, data)
//添加采购入库
export const apiAddPurchaseGoodsStore = (data) => http.post('/seven/purchaseStorage/insert', data)
//修改采购入库
export const apiUpdatePurchaseGoodsStore = (data) => http.post('/seven/purchaseStorage/updateById', data)
//采购入库
export const apiGetPurchaseGoodsStore = (data) => http.post('/seven/purchaseStorage/select', data)
//查询借出信息
export const apiGetLendingList = (data) => http.post('/seven/lendingHead/select', data)
//添加借出信息
export const apiAddLendingInfo = (data) => http.post('/seven/lendingHead/insert', data)
//修改借出信息
export const apiUpdateLendingInfo = (data) => http.post('/seven/lendingHead/updateById', data)
//查询借出详情
export const apiGetLendingDetail = (data) => http.post('/seven/lendingBody/select', data)
//删除借出详情
export const apiDeleteLendingDetail = (data) => http.post('/seven/lendingBody/deleteById', data)
//单条归还
export const apiReturnLending = (data) => http.post('/seven/lendingBody/productReturn', data)
//全部归还
export const apiReturnAllLending = (data) => http.post('/seven/lendingHead/productReturnAll', data)
//查询养护信息
export const apiGetMaintainList = (data) => http.post('/seven/maintenanceManagement/select', data)
//修改养护信息
export const apiUpdateMaintainInfo = (data) => http.post('/seven/maintenanceManagement/updateById', data)
//删除养护信息
export const apiDeleteMaintainInfo = (data) => http.post('/seven/maintenanceManagement/deleteById', data)
//查询养护详情
export const apiGetMaintainDetail = (data) => http.post('/seven/maintenanceManagementBody/select', data)
//编辑养护详情
export const apiEditMaintainDetail = (data) => http.post('/seven/maintenanceManagementBody/updateById', data)
//查询品控信息
export const apiGetQualityList = (data) => http.post('/seven/qualityControl/select', data)
//添加品控信息
export const apiAddQualityInfo = (data) => http.post('/seven/qualityControl/insert', data)
//修改品控信息
export const apiUpdateQualityInfo = (data) => http.post('/seven/qualityControl/updateById', data)
//把数据保存到仓库
export const apiUpdataDataToStore = (data) => http.post('/seven/qualityControl/qualityControlCompleted', data)
//查询销售列表
export const apiGetSalesList = (data) => http.post('/seven/productSales/select', data)
//添加销售信息
export const apiAddSales = (data) => http.post('/seven/productSales/insert', data)
//修改销售信息
export const apiUpdateSales = (data) => http.post('/seven/productSales/updateById', data)
//查询鉴定信息
export const apiGetIdentifyList = (data) => http.post('/seven/identify/select', data)
//添加鉴定信息
export const apiAddIdentifyInfo = (data) => http.post('/seven/identify/insert', data)
//修改鉴定信息
export const apiUpdateIdentifyInfo = (data) => http.post('/seven/identify/updateById', data)